<template>
	<view class="list">
		<view class="list_item" v-for="item,index in list" @click="handleDetail(item.id)">
			<!--  mode="widthFix" -->
			<image style="width: 248rpx;height: 248rpx;object-fit: cover;" :src="item.images[0]"></image>
			<view class="item_content">
				<view class="item_title">{{item.title}}</view>
				<view class="item_m">{{item.area}}㎡/{{item.floor}}层</view>
				<view class="item_price">￥{{item.price || 0}} <span style="font-size: 24rpx;">/月</span> </view>
				<view class="item_tip">
					<view v-for="item,index in item.tags">
						{{item}}
						<!-- <view class="item_tip_last">交通便利</view> -->
					</view>
				</view>
			</view>
		</view>
		<view class="more">- 没有更多了 -</view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				required: true // 该参数是必需的
			}
		},
		data() {
			return {

			}
		},
		methods:{
			//详情
			handleDetail(id) {
				uni.navigateTo({
					url: '/pages/index/detail?id=' + id
				})
			},
		}
	}
</script>

<style>
	.list {
		width: 100%;
		padding: 0 32rpx;
		margin-top: 44rpx;
		box-sizing: border-box;
	}

	.list_item {
		display: flex;
		justify-content: space-between;
		margin-bottom: 34rpx;
		border-bottom: 1rpx solid #E3E3E3;
		padding-bottom: 34rpx;
	}

	.item_content {
		width: calc(100% - 268rpx);

	}

	.item_title {
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #333333;
		width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.item_m {
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #666666;
		margin-top: 12rpx;
	}

	.item_price {
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #FF6200;
		margin-top: 40rpx;
	}

	.item_tip {
		display: flex;
		flex-wrap: wrap;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		margin-top: 10rpx;

	}

	.item_tip>view {
		display: inline-block;
		margin-right: 12rpx;
		background: #FFF3EB;
		border-radius: 8rpx;
		border: 2rpx solid #FF6200;
		color: #FF6200;
		padding: 6rpx 16rpx;
		margin-bottom: 16rpx;

	}

	.item_tip>view:last-child {
		background: #EDFFE5;
		border-radius: 8rpx;
		border: 2rpx solid #31A653;
		color: #31A653;
		/* margin-left: 12rpx; */
		padding: 6rpx 16rpx;
	}
</style>